

******************************************************************************
*MAIN TEXT********************************************************************
******************************************************************************

**DATA FOR FIGURE 1 (BOTTOM PANEL)
use "attacks.dta", clear
**

*FIGURE 1, BOTTOM PANEL (TO REPLICATE THE UPPER PANEL (MAP) SEE DATAVERSE (R CODE))

twoway (line attack_count_year ayear, connect(stairstep)) ///
 , scheme(538w) legend(off) ///
 xlabel(1977(1)2008, format(%tyCY) angle(vertical) nogrid) xscale(range(1976.5 2009)) xtitle("") ///
 ylabel(0(10)120, nogrid) yscale(range(0 122.5)) ytitle("N. of attacks") yline(0, lcolor(538axis) lpattern(solid)) ///
 xline(1977.4548 1979.1644 1982.8247 1986.4740 1989.8274 1993.4301 1996.4235 2000.1967 2004.2022 2008.1885, lcolor(538m)) ///
 text(122.5 1977.4548 "Elections 1977", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(122.5 1979.1644 "Elections 1979", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(122.5 1982.8247 "Elections 1982", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(122.5 1986.4740 "Elections 1986", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(122.5 1989.8274 "Elections 1989", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(122.5 1993.4301 "Elections 1993", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(122.5 1996.4235 "Elections 1996", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(122.5 2000.1967 "Elections 2000", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(122.5 2004.2022 "Elections 2004", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(122.5 2008.1885 "Elections 2008", place(se) just(left) size(vsmall) orientation(vertical) color(538m))
*graph export fig_descyearly_updated.pdf, replace



**DATA FOR TABLES 1-3 AND FIGURES 2-4
use "dyads_main.dta", clear
**

*TABLE 1: MAIN ESTIMATES

quietly{

est clear

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store main1
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store main2
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store main3
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store main4
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store main5
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store main6
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9
}

esttab main*, replace noomitted label nonotes noobs nodepvar nomtitles ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")

/*
esttab main* using tab_main_updated.tex, replace noomitted label nonotes noobs nodepvar nomtitles booktabs ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 interaction(" $\times$ ") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")
*/

 
*TABLE 2: PREDICTED VALUES 

quietly{
	
est clear

quietly reghdfe incumbent100 c.lagincumbent100 c.proxlog_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)

sum proxlog_std if inrange(distance,0,0) & e(sample)
*8.61
sum proxlog_std if inrange(distance,99,101) & e(sample)
*1.86
sum proxlog_std if inrange(distance,199,201) & e(sample)
*0.85
sum proxlog_std if inrange(distance,299,301) & e(sample)
*0.26
sum proxlog_std if inrange(distance,399,401) & e(sample)
*-0.16
sum proxlog_std if inrange(distance,499,501) & e(sample)
*-0.49
sum proxlog_std if inrange(distance,599,601) & e(sample)
*-0.75
sum proxlog_std if inrange(distance,699,701) & e(sample)
*-.98
sum proxlog_std if inrange(distance,799,801) & e(sample)
*-1.17
sum proxlog_std if inrange(distance,899,901) & e(sample)
*-1.35
sum proxlog_std if inrange(distance,999,1001) & e(sample)
*-1.50

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
margins , at(proxlog_std=(8.61 1.86 0.85 0.26 -0.16 -0.49 -0.75 -0.98 -1.17 -1.35 -1.50)) noestimcheck post
eststo dist
sum incumbent100 if e(sample)
estadd scalar average = r(mean)

}


esttab dist, replace label noobs nonumbers nomtitles ///
 cells("b(fmt(2))") ///
 coeflabels(1._at "0 km" 2._at "100 km" 3._at "200 km" 4._at "300 km" 5._at "400 km" 6._at "500 km" 7._at "600 km" 8._at "700 km" 9._at "800 km" 10._at "900 km" 11._at "1000 km") ///
 stats(average, labels("Average") fmt(%9.2f)) ///
 collabels("Predicted Incumbent Vote Share (%)")
 
/*
esttab dist using tab_predprox_noci_updated.tex, replace label nostar noobs nonumbers nomtitles booktabs ///
 cells("b(fmt(2))") ///
 coeflabels(1._at "0 km" 2._at "100 km" 3._at "200 km" 4._at "300 km" 5._at "400 km" 6._at "500 km" 7._at "600 km" 8._at "700 km" 9._at "800 km" 10._at "900 km" 11._at "1000 km") ///
 stats(average, labels("Average") fmt(%9.2f)) ///
 collabels("Predicted Incumbent Vote Share (\%)")
*/ 



*FIGURE 2: CONDITIONAL ROLE OF TIMING

quietly{
	
reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
margins, dydx(proxlog_std) at(proxelec=(0(.05)1)) noestimcheck
marginsplot, legend(pos(6) row(1)) yline(0, lcolor(538m) lwidth(medthick)) ///
 title("") xtitle("Proximity to next election", height(5)) ytitle("Marginal Effect of Exposure on Vote Share of Incumbent", size(small)) yscale(titlegap(*-20)) ///
 addplot(histogram proxelec if e(sample), start(0) width(.1) legend(off) below fcolor(none) lcolor(gs10) ///
 yaxis(2) yscale(off axis(2)) yscale(range(-1.3 0.3) axis(1)) ylabel(-1.2(.2).6, nogrid axis(1)) ///
 xlabel(0(.1)1, nogrid)) ///
 plot1opts(msize(medsmall) mcolor(538b) lcolor(538b)) ci1opts(lwidth(medium) lcolor(538b)) ///
 scheme(538w) saving(fig_timing_lin, replace)


reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##i.termquarter if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
margins, dydx(proxlog_std) at(termquarter=(1 2 3 4)) noestimcheck
marginsplot, legend(pos(6) row(1)) yline(0, lcolor(538m) lwidth(medthick)) ///
 title("") xtitle("Quarter of term", height(5)) ytitle("Marginal Effect of Exposure on Vote Share of Incumbent", size(small)) yscale(titlegap(*-20)) ///
 xlabel(1 "1st" 2 "2nd" 3 "3rd" 4 "4th", nogrid) xscale(range(0.9 4.1)) ///
 addplot(histogram termquarter if e(sample), discrete yaxis(2) yscale(off axis(2)) yscale(range(-1.3 0.3) axis(1)) ylabel(-1.2(.2).6, nogrid axis(1))  legend(off) below fcolor(none) lcolor(gs10)) ///
 plot1opts(msize(medsmall) mcolor(538b) lcolor(538b)) ci1opts(lwidth(medium) lcolor(538b)) ///
 scheme(538w) saving(fig_timing_quart, replace)
 
}

graph combine fig_timing_lin.gph fig_timing_quart.gph
*graph export fig_timing_comb_updated.pdf, replace



*FIGURE 3: MECHANISMS, BY TYPE OF ATTACK

quietly{
	
reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec##i.target_* if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
margins , dydx(proxlog_std) at(proxelec=(0(.1)1) target_mil=1) at(proxelec=(0(.1)1) target_pol=1) at(proxelec=(0(.1)1) target_civ=1) noestimcheck
marginsplot, legend(order(4 "Military/""Police" 5 "Politicians/""Public officials" 6 "Civilians") pos(6) row(1)) title("By type of victim", pos(12)) yline(0, lcolor(538m) lwidth(medthick)) ///
 xtitle("Proximity to next election", height(5)) ytitle("Marginal Effect of Exposure on Vote Share of Incumbent", size(small)) ///
 xlabel(0(.1)1, nogrid) ylabel(-2.5(.5)1, nogrid) ///
 plot1opts(msize(medsmall) mcolor(538b) lcolor(538b)) ci1opts(lwidth(medium) lcolor(538b)) ///
 plot2opts(msize(medsmall) mcolor(538p) lcolor(538p)) ci2opts(lwidth(medium) lcolor(538p)) ///
 plot3opts(msize(medsmall) mcolor(538y) lcolor(538y)) ci3opts(lwidth(medium) lcolor(538y)) ///
 scheme(538w) saving(fig_target_lin, replace)

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec##i.indiscriminate if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
margins , dydx(proxlog_std) at(proxelec=(0(.1)1) indiscriminate=(0 1)) noestimcheck
marginsplot, legend(order(3 "Selective""attack" 4 "Indiscriminate""attack") pos(6) row(1)) title("By type of target", pos(12)) yline(0, lcolor(538m) lwidth(medthick)) ///
 xtitle("Proximity to next election", height(5)) ytitle("Marginal Effect of Exposure on Vote Share of Incumbent", size(small)) ///
 xlabel(0(.1)1, nogrid) ylabel(-2.5(.5)1, nogrid) ///
 plot1opts(msize(medsmall) mcolor(538b) lcolor(538b)) ci1opts(lwidth(medium) lcolor(538b)) ///
 plot2opts(msize(medsmall) mcolor(538p) lcolor(538p)) ci2opts(lwidth(medium) lcolor(538p)) ///
 scheme(538w) saving(fig_indis_lin, replace)

}

graph combine fig_target_lin.gph fig_indis_lin.gph
*graph export fig_triple_lin_updated.pdf, replace



*FIGURE 4: ALTERNATIVE EXPLANATION I (DECREASING EFFECT OF ACCOUNTABILITY)

quietly{
	
reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
margins, dydx(proxelec) at(proxlog_std=(-1(1)8.6)) noestimcheck

}

marginsplot, legend(pos(6) row(1)) yline(0, lcolor(538m) lwidth(medthick)) ///
 title("") xtitle("Exposure to attack", height(5)) ytitle("Marginal Effect of Proximity to Next Election" "on Vote Share of Incumbent", size(small)) ///
 yscale(range(-5 15)) ylabel(-5(5)15) ///
 xlabel(-1 "700km" 8.2 "0km", nogrid) ///
 plot1opts(msize(medsmall) mcolor(538b) lcolor(538b)) ci1opts(lwidth(medium) lcolor(538b)) ///
 scheme(538w)
*graph export fig_geo_lin_updated.pdf, replace



*TABLE 3: ALTERNATIVE EXPLANATION II (ORDER OF ATTACK)

quietly{

est clear

quietly reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxlog_std#c.numattack if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck post
est store malt4
estadd local control "Attack order"
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = 7500
estadd local n_elec = 9

quietly reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxlog_std#c.numattack if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck post
est store malt5
estadd local control "Attack order"
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = 7500
estadd local n_elec = 9

quietly reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxlog_std#c.numattack if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck post
est store malt6
estadd local control "Attack order"
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = 7500
estadd local n_elec = 9

quietly reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxlog_std#c.numattack_incumbentperiod if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck post
est store malt7
estadd local control "Attack order (by incumbent period)"
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = 7500
estadd local n_elec = 9

quietly reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxlog_std#c.numattack_incumbentperiod if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck post
est store malt8
estadd local control "Attack order (by incumbent period)"
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = 7500
estadd local n_elec = 9

quietly reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxlog_std#c.numattack_incumbentperiod if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck post
est store malt9
estadd local control "Attack order (by incumbent period)"
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = 7500
estadd local n_elec = 9

}

esttab malt*, replace noomitted label nonotes noobs nodepvar nomtitles ///
 coeflab(1._at "Beginning of term" 2._at "End of term") ///
 b(%9.3f) se(%9.3f) ///
 scalars("control Control: Exposure to attack $\times$" "elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")

/*
esttab malt* using tab_malt_updated.tex, replace noomitted label nonotes noobs nodepvar nomtitles booktabs ///
 coeflab(1._at "Beginning of term" 2._at "End of term") ///
 b(%9.3f) se(%9.3f) ///
 scalars("control Control: Exposure to attack $\times$" "elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 interaction(" $\times$ ") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")
*/



*******************************************************************************
*SUPPLEMENTARY MATERIALS*******************************************************
*******************************************************************************

**DATA FOR TABLE A1 AND FIGURES A1-A3
use "dyads_main.dta", clear
**

*FIGURE A1: DESCRIPTIVES BY GROUP

quietly{

eststo clear

quietly reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)

}

graph hbar (count) if codmun==2001 & e(sample), over(terrorgroup, label(labsize(small))) blabel(bar, size(small)) ytitle("Frequency") ylabel(0(20)120) scheme(538w)
*graph export fig_descgroup_updated.pdf, replace


*TABLE A1: ATTACKS BY REGION

quietly{

eststo clear

quietly reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
estpost tab ccaa_dtv_string if codmun==2001 & e(sample)
eststo reg
}

esttab reg, nonotes nomtitles noobs
*esttab reg using tab_reg_updated.tex, replace nonotes nomtitles noobs booktabs


*FIGURE A2: ATTACKS BY TERM

quietly{

label define term 1"1977-1979 (UCD)" 2"1979-1982 (UCD)" 3"1982-1986 (PSOE)" 4"1986-1989 (PSOE)" 5"1989-1993 (PSOE)" 6"1993-1996 (PSOE)" 7"1996-2000 (PP)" 8"2000-2004 (PP)" 9"2004-2008 (PSOE)"
label values term term

}

quietly reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
graph bar (count) if codmun==2001 & e(sample), over(term, label(labsize(vsmall))) blabel(bar, size(small)) ytitle("Frequency") ylabel(0(10)60) scheme(538w)
*graph export fig_descterm_inc_updated.pdf, replace


*FIGURE A3: HISTOGRAM PROXIMITY ELECTIONS

quietly reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)

histogram proxelec if e(sample) & codmun==2001, start(0) width(.1) legend(off) below fcolor(none) lcolor(gs7) ///
 freq ylabel(0(5)35, nogrid) ///
 xlabel(0(.1)01, nogrid) scheme(538w)
*graph export fig_histogram_proxelec_updated.pdf, replace




**DATA FOR TABLE A2
use "muni_term_quarters.dta", clear
**

*TABLE A2: CORRELATES OF ATTACKS

quietly{

eststo clear

reg hit logpop i.quarter b3.incumbent c.year i.region, cluster(codmun)
est sto cor1
estadd local n = e(N)
estadd local n_muni = 7500
estadd local n_reg = 19
estadd local n_elec = 9

reg hit logpop i.quarter b3.incumbent c.year i.region if paisvasco==0 & navarra==0 & canarias==0, cluster(codmun)
est sto cor2
estadd local n = e(N)
estadd local n_muni = 7500
estadd local n_reg = 16
estadd local n_elec = 9

}

esttab cor*, replace noomit label nonotes noobs nodepvar compress ///
 b(%9.4f) se(%9.4f) ///
 mtitles("All regions" "Effective sample of regions") ///
 scalars("n N. of observations" "n_muni N. of municipalities" "n_reg N. of regions" "n_elec N. of terms") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")

/*
esttab cor* using tab_correlates_updated.tex, replace noomit label nonotes noobs nodepvar booktabs ///
 b(%9.4f) se(%9.4f) ///
 mtitles("All regions" "Effective sample of regions") ///
 scalars("n N. of observations" "n_muni N. of municipalities" "n_reg N. of regions" "n_elec N. of terms") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")
*/



**DATA FOR TABLE B1 AND FIGURE B1
use "dyads_ext_allatt.dta", clear /*Due to the Dataverse file size limit, this file is available from the authors upon request*/
**


*TABLE B1: EXTENDED SAMPLE ATTACKS IN THE BASQUE COUNTRY

quietly{
	
eststo clear

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std if paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store yesatteh1
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 701
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std if paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store yesatteh2
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 701
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std if paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store yesatteh3
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 701
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store yesatteh4
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 701
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store yesatteh5
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 701
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store yesatteh6
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 701
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

}

esttab yesatteh*, replace noomitted label nonotes noobs nodepvar nomtitles ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")

/*
esttab yesatteh* using tab_yesatteh_updated.tex, replace noomitted label nonotes noobs nodepvar nomtitles booktabs ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 interaction(" $\times$ ") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")
*/


*FIGURE B1: EXTENDED SAMPLE ATTACKS IN THE BASQUE COUNTRY

quietly{
	
reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
margins, dydx(proxlog_std) at(proxelec=(0(.05)1)) noestimcheck

marginsplot, legend(pos(6) row(1)) yline(0, lcolor(538m) lwidth(medthick)) ///
 title("") xtitle("Proximity to next election", height(5)) ytitle("Marginal Effect of Exposure on Vote Share of Incumbent", size(small)) yscale(titlegap(*-20)) ///
 addplot(histogram proxelec if e(sample), start(0) width(.1) legend(off) below fcolor(none) lcolor(gs10) ///
 yaxis(2) yscale(off axis(2)) yscale(range(-1.3 0.3) axis(1)) ylabel(-1.8(.2).8, nogrid axis(1)) ///
 xlabel(0(.1)1, nogrid)) ///
 plot1opts(msize(medsmall) mcolor(538b) lcolor(538b)) ci1opts(lwidth(medium) lcolor(538b)) ///
 scheme(538w) saving(fig_timing_lin, replace)

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##i.termquarter if paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
margins, dydx(proxlog_std) at(termquarter=(1 2 3 4)) noestimcheck
marginsplot, legend(pos(6) row(1)) yline(0, lcolor(538m) lwidth(medthick)) ///
 title("") xtitle("Quarter of term", height(5)) ytitle("Marginal Effect of Exposure on Vote Share of Incumbent", size(small)) yscale(titlegap(*-20)) ///
 xlabel(1 "1st" 2 "2nd" 3 "3rd" 4 "4th", nogrid) xscale(range(0.9 4.1)) ///
 addplot(histogram termquarter if e(sample), discrete yaxis(2) yscale(off axis(2)) yscale(range(-1.3 0.3) axis(1)) ylabel(-1.8(.2).8, nogrid axis(1))  legend(off) below fcolor(none) lcolor(gs10)) ///
 plot1opts(msize(medsmall) mcolor(538b) lcolor(538b)) ci1opts(lwidth(medium) lcolor(538b)) ///
 scheme(538w) saving(fig_timing_quart, replace)
 
}
 
graph combine fig_timing_lin.gph fig_timing_quart.gph
*graph export fig_timing_comb_yesatteh_updated.pdf, replace


**DATA FOR TABLE B2 AND FIGURE B2
use "dyads_ext_allatt_allmuni.dta", clear /*Due to the Dataverse file size limit, this file is available from the authors upon request*/
**


*TABLE B2: EXTENDED SAMPLE ATTACKS AND MUNICIPALITIES IN THE BASQUE COUNTRY

quietly{

eststo clear

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std if canarias==0, absorb(year) cluster(codmun)
est store allmuni1
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 701
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std if canarias==0, absorb(year attack) cluster(codmun)
est store allmuni2
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 701
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std if canarias==0, absorb(year attack codmun) cluster(codmun)
est store allmuni3
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 701
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if canarias==0, absorb(year) cluster(codmun)
est store allmuni4
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 701
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if canarias==0, absorb(year attack) cluster(codmun)
est store allmuni5
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 701
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if canarias==0, absorb(year attack codmun) cluster(codmun)
est store allmuni6
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 701
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

}

esttab allmuni*, replace noomitted label nonotes noobs nodepvar nomtitles ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")

/*
esttab allmuni* using tab_allmuni_updated.tex, replace noomitted label nonotes noobs nodepvar nomtitles booktabs ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 interaction(" $\times$ ") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")
*/

 
*FIGURE B2: EXTENDED SAMPLE ATTACKS AND MUNICIPALITIES IN THE BASQUE COUNTRY

quietly{

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if canarias==0, absorb(year attack) cluster(codmun)
margins, dydx(proxlog_std) at(proxelec=(0(.05)1)) noestimcheck
marginsplot, legend(pos(6) row(1)) yline(0, lcolor(538m) lwidth(medthick)) ///
 title("") xtitle("Proximity to next election", height(5)) ytitle("Marginal Effect of Exposure on Vote Share of Incumbent", size(small)) yscale(titlegap(*-20)) ///
 addplot(histogram proxelec if e(sample), start() width(.1) legend(off) below fcolor(none) lcolor(gs10) ///
 yaxis(2) yscale(off axis(2)) yscale(range(-1.3 0.3) axis(1)) ylabel(-1.2(.2).6, nogrid axis(1)) ///
 xlabel(0(.1)1, nogrid)) ///
 plot1opts(msize(medsmall) mcolor(538b) lcolor(538b)) ci1opts(lwidth(medium) lcolor(538b)) ///
 scheme(538w) saving(fig_timing_lin, replace)


reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##i.termquarter if canarias==0, absorb(year attack) cluster(codmun)
margins, dydx(proxlog_std) at(termquarter=(1 2 3 4)) noestimcheck
marginsplot, legend(pos(6) row(1)) yline(0, lcolor(538m) lwidth(medthick)) ///
 title("") xtitle("Quarter of term", height(5)) ytitle("Marginal Effect of Exposure on Vote Share of Incumbent", size(small)) yscale(titlegap(*-20)) ///
 xlabel(1 "1st" 2 "2nd" 3 "3rd" 4 "4th", nogrid) xscale(range(0.9 4.1)) ///
 addplot(histogram termquarter if e(sample), discrete yaxis(2) yscale(off axis(2)) yscale(range(-1.3 0.3) axis(1)) ylabel(-1.2(.2).6, nogrid axis(1))  legend(off) below fcolor(none) lcolor(gs10)) ///
 plot1opts(msize(medsmall) mcolor(538b) lcolor(538b)) ci1opts(lwidth(medium) lcolor(538b)) ///
 scheme(538w) saving(fig_timing_quart, replace)
 
}

graph combine fig_timing_lin.gph fig_timing_quart.gph
*graph export fig_timing_comb_allmuni_updated.pdf, replace


 
**DATA FOR TABLES B3-B7 AND FIGURE B3
use "dyads_main.dta", clear
**


*TABLE B3: LINEAR MEASURE OF GEOGRAPHICAL PROXIMITY

quietly{

est clear

reghdfe incumbent100 c.lagincumbent100 c.prox_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store lin1
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.prox_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store lin2
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.prox_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store lin3
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.prox_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store lin4
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.prox_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store lin5
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.prox_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store lin6
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

}

esttab lin*, replace noomitted label nonotes noobs nodepvar nomtitles ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")

/*
esttab lin* using tab_lin_updated.tex, replace noomitted label nonotes noobs nodepvar nomtitles booktabs ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 interaction(" $\times$ ") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")
*/


*TABLE B4: CONTROL FOR ATTACKED MUNICIPALITY

quietly{

est clear

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store main1
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store main2
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store main3
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9


reghdfe incumbent100 c.lagincumbent100 c.proxlog_std i.hit if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store hit1
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std i.hit if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store hit2
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std i.hit if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store hit3
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

}

esttab main* hit*, replace noomitted label nonotes noobs nodepvar nomtitles ///
 b(%9.3f) se(%9.3f) ///
 drop(0.*) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")

/*
esttab main* hit* using tab_hit_updated.tex, replace noomitted label nonotes noobs nodepvar nomtitles booktabs ///
 b(%9.3f) se(%9.3f) ///
 drop(0.*) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 interaction(" $\times$ ") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")
*/

  
*TABLE B5: CONTROL FOR DISTANCE TO MADRID (REGRESSION ESTIMATES)

quietly{

geodist _X _Y -3.6866419 40.486318, gen(distmadrid)

gen logdistmadrid=log(distmadrid+1)
gen revlogdistmadrid=-logdistmadrid
egen proxmadridlog_std=std(revlogdistmadrid)

label var proxmadridlog_std "(Log) Nearness to Madrid (std)"
}

quietly{
	
est clear

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std c.proxmadridlog_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store madrid1
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std c.proxmadridlog_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store madrid2
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std c.proxmadridlog_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store madrid3
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxmadridlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store madrid4
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxmadridlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store madrid5
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxmadridlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store madrid6
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

}

esttab madrid*, replace noomitted label nonotes noobs nodepvar nomtitles ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")

/*
esttab madrid* using tab_madrid_updated.tex, replace noomitted label nonotes noobs nodepvar nomtitles booktabs ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 interaction(" $\times$ ") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")
*/


*TABLE B6: CONTROL FOR DISTANCE TO MADRID (MARGINAL EFFECTS)

quietly{

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxmadridlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck post
est store mmadrid1
estadd local control "Yes"
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = 7500
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxmadridlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck post
est store mmadrid2
estadd local control "Yes"
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = 7500
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxmadridlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck post
est store mmadrid3
estadd local control "Yes"
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = 7500
estadd local n_elec = 9

}

esttab mmadrid*, replace noomitted label nonotes noobs nodepvar nomtitles ///
 coeflab(1._at "Beginning of term" 2._at "End of term") ///
 b(%9.3f) se(%9.3f) ///
 scalars("control Prox. to Madrid $\times$ Prox. to election" "elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")

/*
esttab mmadrid* using tab_mmadrid_updated.tex, replace noomitted label nonotes noobs nodepvar nomtitles booktabs ///
 coeflab(1._at "Beginning of term" 2._at "End of term") ///
 b(%9.3f) se(%9.3f) ///
 scalars("control Prox. to Madrid $\times$ Prox. to election" "elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 interaction(" $\times$ ") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")
*/


*TABLE B7: ACCOUNTING FOR TURNOUT (RESULTS WRT CENSUS)

quietly{

est clear

reghdfe incumbentcens100 c.lagincumbentcens100 c.proxlog_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store cens1
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbentcens100 c.lagincumbentcens100 c.proxlog_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store cens2
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbentcens100 c.lagincumbentcens100 c.proxlog_std if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store cens3
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbentcens100 c.lagincumbentcens100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store cens4
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbentcens100 c.lagincumbentcens100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store cens5
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbentcens100 c.lagincumbentcens100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store cens6
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

}

esttab cens*, replace noomitted label nonotes noobs nodepvar nomtitles ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")

/*
esttab cens* using tab_cens_updated.tex, replace noomitted label nonotes noobs nodepvar nomtitles booktabs ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 interaction(" $\times$ ") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")
*/

 
*FIGURE B3: ALTERNATIVE MEASURE OF PROXIMITY TO ELECTIONS (QUINTILES)

quietly{

quietly reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)

egen termquintile=cut(proxelec) if e(sample), group(5)

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##i.termquintile if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
margins, dydx(proxlog_std) at(termquintile=(0 1 2 3 4)) noestimcheck

}

marginsplot, legend(pos(6) row(1)) yline(0, lcolor(538m) lwidth(medthick)) ///
 title("") xtitle("Term quintile", height(5)) ytitle("Marginal Effect of Exposure on Vote Share of Incumbent", size(small)) yscale(titlegap(*-20)) ///
 xlabel(0 "1st" 1 "2nd" 2 "3rd" 3 "4th" 4 "5th", nogrid) xscale(range(0.9 4.1)) ///
 addplot(histogram termquintile if e(sample), discrete yaxis(2) yscale(off axis(2)) yscale(range(-1.3 0.3) axis(1)) ylabel(-1.2(.2).6, nogrid axis(1)) legend(off) below fcolor(none) lcolor(gs10)) ///
 plot1opts(msize(medsmall) mcolor(538b) lcolor(538b)) ci1opts(lwidth(medium) lcolor(538b)) ///
 scheme(538w)
*graph export fig_timing_quintile_updated.pdf, replace



**DATA FOR FIGURE C1
use "attacks.dta", clear
**

*FIGURE C1: ATTACKS OVER TIME, BY INCUMBENT

twoway (line attack_count_year_sample ayear, connect(stairstep)) ///
 (connected period insdate, msymbol(pipe) msize(large) color(gs5)) ///
 , scheme(538w) legend(off) ///
 xlabel(1977(1)2008, format(%tyCY) angle(vertical) nogrid) xscale(range(1976.5 2009)) xtitle("") ///
 ylabel(0(5)45, nogrid) yscale(range(-1 45)) ytitle("N. of attacks") ///
 xline(1977.4548 1979.1644 1982.8247 1986.4740 1989.8274 1993.4301 1996.4235 2000.1967 2004.2022 2008.1885, lcolor(538m)) ///
 text(45 1977.4548 "Elections 1977", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(45 1979.1644 "Elections 1979", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(45 1982.8247 "Elections 1982", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(45 1986.4740 "Elections 1986", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(45 1989.8274 "Elections 1989", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(45 1993.4301 "Elections 1993", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(45 1996.4235 "Elections 1996", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(45 2000.1967 "Elections 2000", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(45 2004.2022 "Elections 2004", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(45 2008.1885 "Elections 2008", place(se) just(left) size(vsmall) orientation(vertical) color(538m)) ///
 text(-2.5 1980.13975 "UCD", place(n) just(left) size(small) orientation(horizontal) color(gs5) box bcolor(white) margin(tiny)) ///
 text(-2.5 1989.6241 "PSOE", place(n) just(left) size(small) orientation(horizontal) color(gs5) box bcolor(white) margin(tiny)) ///
 text(-2.5 2000.31285 "PP", place(n) just(left) size(small) orientation(horizontal) color(gs5) box bcolor(white) margin(tiny)) ///
 text(-2.5 2006.19535 "PSOE", place(n) just(left) size(small) orientation(horizontal) color(gs5) box bcolor(white) margin(tiny))
*graph export fig_descyearly_inc_updated.pdf, replace



**DATA FOR TABLES C1, D1-D2 AND FIGURE C2
use "dyads_main.dta", clear
**


*TABLE C1: HETEROGENEITY BY INCUMBENT

quietly{

est clear

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0 & incumbentname=="UCD", absorb(year attack) cluster(codmun)
est store inc1
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 73
estadd local n_muni = e(N_clust)
estadd local n_elec = 2

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0 & incumbentname=="UCD", absorb(year attack) cluster(codmun)
est store inc2
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 73
estadd local n_muni = e(N_clust)
estadd local n_elec = 2

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0 & incumbentname=="PSOE", absorb(year attack) cluster(codmun)
est store inc3
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 103
estadd local n_muni = e(N_clust)
estadd local n_elec = 5

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0 & incumbentname=="PSOE", absorb(year attack) cluster(codmun)
est store inc4
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 103
estadd local n_muni = e(N_clust)
estadd local n_elec = 5

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0 & incumbentname=="PP", absorb(year attack) cluster(codmun)
est store inc5
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 47
estadd local n_muni = e(N_clust)
estadd local n_elec = 2

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec if eh==0 & paisvasco==0 & navarra==0 & canarias==0 & incumbentname=="PP", absorb(year attack) cluster(codmun)
est store inc6
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 47
estadd local n_muni = e(N_clust)
estadd local n_elec = 2

}

esttab inc*, replace noomitted label nonotes noobs nodepvar nomtitles ///
 mgroups("UCD" "PSOE" "PP", pattern(1 0 1 0 1 0)) ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")

/*
esttab inc* using tab_inc_updated.tex, replace noomitted label nonotes noobs nodepvar nomtitles booktabs ///
 mgroups("UCD" "PSOE" "PP", pattern(1 0 1 0 1 0)  prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 interaction(" $\times$ ") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")
*/
 

*FIGURE C2: HETEROGENEITY BY TERRORIST GROUP (ETA VS OTHERS)

quietly{

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec##i.eta if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
margins , dydx(proxlog_std) at(proxelec=(0(.1)1) eta=(1 0)) noestimcheck
}

marginsplot, legend(order(3 "Other groups" 4 "ETA") pos(6) row(1)) title("By group", pos(12)) yline(0, lcolor(538m) lwidth(medthick)) ///
 xtitle("Proximity to next election", height(5)) ytitle("Marginal Effect of Exposure on Vote Share of Incumbent", size(small)) ///
 xlabel(0(.1)1, nogrid) ylabel(-1.5(.5)1, nogrid) ///
 plot1opts(msize(medsmall) mcolor(538b) lcolor(538b)) ci1opts(lwidth(medium) lcolor(538b)) ///
 plot2opts(msize(medsmall) mcolor(538p) lcolor(538p)) ci2opts(lwidth(medium) lcolor(538p)) ///
 scheme(538w)
*graph export fig_group_lin_updated.pdf, replace



*TABLE D1: COMPLETE REGRESSION TABLES TRIPLE INTERACTIONS

quietly{

est clear

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec##i.indiscriminate if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store triple1
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec##i.indiscriminate if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store triple2
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec##i.indiscriminate if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store triple3
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec##i.target_* if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store triple4
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec##i.target_* if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store triple5
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec##i.target_* if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store triple6
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

}

esttab triple*, replace noomitted label nonotes noobs nodepvar noomitted nomtitles ///
 b(%9.3f) se(%9.3f) ///
 drop(0.*) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")

/*
esttab triple* using tab_triple_updated.tex, replace noomitted label nonotes noobs nodepvar noomitted nomtitles booktabs ///
 b(%9.3f) se(%9.3f) ///
 drop(0.*) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 interaction(" $\times$ ") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")
*/


*TABLE D2: ALTERNATIVE EXPLANATION II (ORDER OF ATTACK) COMPLETE TABLE

quietly{

eststo clear

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxlog_std#c.numattack if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store alt1
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxlog_std#c.numattack if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store alt2
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxlog_std#c.numattack if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store alt3
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxlog_std#c.numattack_incumbentperiod if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year) cluster(codmun)
est store alt4
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck
estadd local elec_fe "Yes"
estadd local attack_fe "No"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxlog_std#c.numattack_incumbentperiod if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack) cluster(codmun)
est store alt5
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "No"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

reghdfe incumbent100 c.lagincumbent100 c.proxlog_std##c.proxelec c.proxlog_std#c.numattack_incumbentperiod if eh==0 & paisvasco==0 & navarra==0 & canarias==0, absorb(year attack codmun) cluster(codmun)
est store alt6
margins, dydx(proxlog_std) at(proxelec=(0 1)) noestimcheck
estadd local elec_fe "Yes"
estadd local attack_fe "Yes"
estadd local muni_fe "Yes"
estadd local n = e(N)
estadd local n_attack = 223
estadd local n_muni = e(N_clust)
estadd local n_elec = 9

}

esttab alt*, replace noomitted label nonotes noobs nodepvar nomtitles ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")

/*
esttab alt* using tab_alt_updated.tex, replace noomitted label nonotes noobs nodepvar nomtitles booktabs ///
 b(%9.3f) se(%9.3f) ///
 scalars("elec_fe Election FE" "attack_fe Attack FE" "muni_fe Municipality FE" "n N. of observations" "n_attack N. of attacks" "n_muni N. of municipalities" "n_elec N. of elections") ///
 interaction(" $\times$ ") ///
 addnotes("Standard errors clustered by municipality in parentheses" "\sym{*} \(p<.05\), \sym{**} \(p<.01\), \sym{***} \(p<.001\).")
*/
